package com.etc.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Music implements Serializable {
    private Integer mid;

    private Integer mAid;

    private String mtitle;

    private String mdesc;

    private String murl;

    private String mimg;

    private String mname;

    private Date mcreatetime;
    
    private List<Talk> talks=new ArrayList<>();
    
    private static final long serialVersionUID = 1L;

    public Integer getMid() {
        return mid;
    }

    public void setMid(Integer mid) {
        this.mid = mid;
    }

    public Integer getmAid() {
        return mAid;
    }

    public void setmAid(Integer mAid) {
        this.mAid = mAid;
    }

    public String getMtitle() {
        return mtitle;
    }

    public void setMtitle(String mtitle) {
        this.mtitle = mtitle == null ? null : mtitle.trim();
    }

    public String getMdesc() {
        return mdesc;
    }

    public void setMdesc(String mdesc) {
        this.mdesc = mdesc == null ? null : mdesc.trim();
    }

    public String getMurl() {
        return murl;
    }

    public void setMurl(String murl) {
        this.murl = murl == null ? null : murl.trim();
    }

    public String getMimg() {
        return mimg;
    }

    public void setMimg(String mimg) {
        this.mimg = mimg == null ? null : mimg.trim();
    }

    public String getMname() {
        return mname;
    }

    public void setMname(String mname) {
        this.mname = mname == null ? null : mname.trim();
    }

    public Date getMcreatetime() {
        return mcreatetime;
    }

    public void setMcreatetime(Date mcreatetime) {
        this.mcreatetime = mcreatetime;
    }
    
    public List<Talk> getTalks() {
		return talks;
	}

	public void setTalks(List<Talk> talks) {
		this.talks = talks;
	}

	@Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Music other = (Music) that;
        return (this.getMid() == null ? other.getMid() == null : this.getMid().equals(other.getMid()))
            && (this.getmAid() == null ? other.getmAid() == null : this.getmAid().equals(other.getmAid()))
            && (this.getMtitle() == null ? other.getMtitle() == null : this.getMtitle().equals(other.getMtitle()))
            && (this.getMdesc() == null ? other.getMdesc() == null : this.getMdesc().equals(other.getMdesc()))
            && (this.getMurl() == null ? other.getMurl() == null : this.getMurl().equals(other.getMurl()))
            && (this.getMimg() == null ? other.getMimg() == null : this.getMimg().equals(other.getMimg()))
            && (this.getMname() == null ? other.getMname() == null : this.getMname().equals(other.getMname()))
            && (this.getMcreatetime() == null ? other.getMcreatetime() == null : this.getMcreatetime().equals(other.getMcreatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMid() == null) ? 0 : getMid().hashCode());
        result = prime * result + ((getmAid() == null) ? 0 : getmAid().hashCode());
        result = prime * result + ((getMtitle() == null) ? 0 : getMtitle().hashCode());
        result = prime * result + ((getMdesc() == null) ? 0 : getMdesc().hashCode());
        result = prime * result + ((getMurl() == null) ? 0 : getMurl().hashCode());
        result = prime * result + ((getMimg() == null) ? 0 : getMimg().hashCode());
        result = prime * result + ((getMname() == null) ? 0 : getMname().hashCode());
        result = prime * result + ((getMcreatetime() == null) ? 0 : getMcreatetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", mid=").append(mid);
        sb.append(", mAid=").append(mAid);
        sb.append(", mtitle=").append(mtitle);
        sb.append(", mdesc=").append(mdesc);
        sb.append(", murl=").append(murl);
        sb.append(", mimg=").append(mimg);
        sb.append(", mname=").append(mname);
        sb.append(", mcreatetime=").append(mcreatetime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}